import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/Home'
import User from '../views/user/User'
Vue.use(VueRouter)

const routes = [
    {
        path:'/',
        redirect:'/home' //路由要存在的
    },
    {
        path:'/home', //小明
        name:'home',
        component:Home
    },{
        path:'/user', //小强
        name:'user',
        component:User
    }
]

const router = new VueRouter({
    routes
})
export default router